from selenium.webdriver.common.by import By
from selenium import webdriver

# 页面
from pppp.base.webkey import WebKeys
from pppp.locator.logoLocator import *


class loginPage(WebKeys):
    def login(self, name, passworname):
        self.open("http://novel.hctestedu.com/user/login.html")
        self.one_input(*username, name)
        self.one_input(*password, passworname)
        self.one_click(*login)
        self.leep(5)
        # self.one_click(*select)
        # self.leep(5)

    # 获得登录的结果
    # def get_result_true(self, txt):
    #     result = self.long_text(*login_text_wei, txt)
    #     return result
    def get_result_true(self, txt):
        result = self.get_text_true_wait(*login_text_true, txt)
        return result


if __name__ == '__main__':
    eling = loginPage(webdriver.Chrome())
    eling.login("15574113907", "123456")
